package com.green.system.config;//package com.green.system.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/*
 * Created with IntelliJ IDEA.
 *
 * @Author: Green
 * @Date: 2021/10/18/23:58
 * @Description:
*/

//@Configuration
//public class CorsConfig implements WebMvcConfigurer {
//    @Override
//    public void addCorsMappings(CorsRegistry registry) {
//        registry.addMapping("/*")
//                .allowedOrigins("/*")
//                .allowedMethods("GET,POST,PUT,DELETE,HEAD,OPTIONS")
//                .allowedHeaders("*")
//                .allowCredentials(true)//是否可以携带cookie
//                .maxAge(3600);
//    }
//}
